package ch.ethz.fcl.overlays;

import java.util.ArrayList;

import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;

import android.util.Log;

public class OverlayManager {
	private static final String TAG = "Overlay Manager";
	public static ArrayList<Overlay> overlays;

	public OverlayManager(MapView mapView) {
		if (overlays == null || size() >= 2)
			overlays = new ArrayList<Overlay>();
		Log.d(TAG, TAG);
	}

	public void addList(Overlay overlay) {
		overlays.add(overlay);
	}

	public static Overlay getOverlay(int i) {
		if (i >= 0 && i < overlays.size())
			return overlays.get(i);
		else
			return null;
	}

	public int size() {
		return overlays.size();
	}
	
	public static CircleOverlay getCircleOverlay(int index){
		return (CircleOverlay) overlays.get(index);
	}
	
	public static ScreenLineOverlay getScreenLineOverlay(int index){
		return (ScreenLineOverlay) overlays.get(index);
	}
}
